<template>
  <div>
    <H1>标题</H1>
    <h3>姓名:{{ name }}</h3>
    <h3>年龄:{{ age }}</h3>
    <button @click="chenck">点击切换姓名</button>
  </div>
</template>

<script>
export default {
  name: 'RefCom',
  data() {
    return {
      name: '张三',
      age: 19,
    }
  },
  methods: {
    chenck() {
      this.name = '小李四';

    }
  },
}
</script>

<style scoped></style>